<?php require(PUBLIC_PATH."header.php"); ?>

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
  <h2 class="text-center">用户编辑</h2>
	<form action="<?php echo SITE_ROOT;?>/admin.php?c=user&m=update" method="post"  class="form-horizontal" enctype="multipart/form-data">
	    <div class="form-group">
            <div class="col-md-10 col-xs-9">
                <input type="hidden" name="uid" value="<?php echo  $data['one']['uid']; ?>">
            </div>
        </div>
		<div class="form-group">
            <label for="uname" class="col-xs-3 col-md-2 control-label">用户名</label>
                <div class="col-md-10 col-xs-9 ">
                        <input type="text" class="form-control" id="uname" placeholder="用户名" name="uname"  value= "<?php echo $data['one']['uname']; ?>" >
                </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-xs-3 col-md-2 control-label">密码</label>
            <div class="col-md-10 col-xs-9">
                <input type="password" name="password" id="password" required>
            </div>
        </div>
        <div class="form-group">
            <label for="cpassword" class="col-xs-3 col-md-2 control-label">确认密码</label>
            <div class="col-md-10 col-xs-9">
                <input type="password" name="cpassword" id="cpassword" required>
            </div>
        </div>
        <div class="form-group">
                      <label for="gender" class="col-md-2 col-xs-3 control-label">性别</label>
                      <div class=" col-md-10 col-xs-9">
                        <label class="radio-inline">
                          <input type="radio" name="gender" id="gender" value="0" 
                            <?php echo $data['one']['gender']==0?'checked':''; ?>
                           > 男
                        </label>
                        <label class="radio-inline">
                              <input type="radio" name="gender" id="gender" value="1" 
                                <?php echo $data['one']['gender']==1?'checked':''; ?>
                              > 女
                        </label>
                      </div>
        </div>
        <div class="form-group">
            <label for="gender" class="col-md-2 col-xs-3 control-label">爱好</label>
                <div class=" col-md-10 col-xs-9">
                    <label class="checkbox-inline">
                        <input type="checkbox" name="hobby[]" id="hobby" value="旅游" <?php if(strstr($data['one']['hobby'],'旅游')){echo 'checked';} ?>>旅游
                    </label>
                    <label class="checkbox-inline">
                          <input type="checkbox" name="hobby[]" id="hobby" value="登山" <?php if(strstr($data['one']['hobby'],'登山')){echo 'checked';} ?>>登山
                    </label>
                    <label class="checkbox-inline">
                          <input type="checkbox" name="hobby[]" id="hobby" value="健身" <?php if(strstr($data['one']['hobby'],'健身')){echo 'checked';} ?>>健身
                    </label>
                </div>       
        </div>	
        <div class="form-group">
                    <div class="col-md-10 col-xs-9 col-md-offset-2 col-xs-offset-3">
                    <!-- 小设备可偏移 -->
                        <input type="submit" value="提交" class="btn btn-primary btn-lg">
                        <input type="reset" value="取消" class="btn btn-default">
                    </div>
        </div>	
         



<?php require(PUBLIC_PATH."footer.php"); ?>
